package com.cyz.user.controller;

import com.cyz.user.userService.AdService;
import com.cyz.common.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

//TODO: 权限管理没做

@Api(tags = "用户端广告相关接口")
@RestController
@RequestMapping("/ad")
public class AdController {

    @Autowired
    private AdService adService;

    @ApiOperation(value = "查询免费课程页面广告信息")
    @GetMapping("/queryFreeAds")
    public R queryFreeAds(){
        return adService.queryFreeAds();
    }

    @ApiOperation(value = "查询付费课程页面广告信息")
    @GetMapping("/queryMoneyAds")
    public R queryMoneyAds(){
        return adService.queryMoneyAds();
    }

}
